package com.kaka.demomptest.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data
public class User {
    @TableId(type = IdType.ASSIGN_ID)   //默认主键策略
    private Long id;
    private String name;
    private Integer age;
    private String email;

    @TableField(fill = FieldFill.INSERT)    //自动填充属性注解
    private Date createTime;    //create_time
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;    //update_time

    @Version    //版本号
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    @TableLogic //逻辑删除标志位
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

}
